<template>
    <div class="main-page" >
        <el-form :model="childForm" :rules="rules"  label-width="70px" ref="addSubject"
                 size="mini">
            <el-row type="flex" justify="center">
                <el-col :span="10">
                    <el-form-item label="科目名称" prop="name">
                        <el-input size="mini" class="search-input" v-model="childForm.name"
                                  placeholder="必填"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </div>
</template>

<script>
    import {mapActions, mapState, mapGetters} from 'vuex'
    import headTop from '../../components/headTop'
    import {userList} from '@/api/getData'
    import ElInput from "../../../node_modules/element-ui/packages/input/src/input.vue";
    import ElOption from "../../../node_modules/element-ui/packages/select/src/option.vue";

    export default {
        name:'addSubject',
        props:{

        },
        data() {
            return {
                opertype:'',
                childForm:{

                },
                 rules: {
                    name: [
                        {required: true, message: '', trigger: 'blur'},
                    ]

                },
            }
        },
        components: {
            ElOption,
            ElInput,
            headTop,

        },
        computed: {
            ...mapGetters(['userInfo'])
        },
        created() {
        },
        mounted() {

        },
        methods: {
            ...mapActions(['']),

            validFrom(){
                let flag = false
                this.$refs['addSubject'].validate((valid) => {
                    flag = valid
                })
                return flag;

            }
        },
    }
</script>
<style lang="less">
    @import '../../style/mixin';

    .el-table .sks {
        background: #c2e7b0;
    }
</style>
